﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Reflection;

using Microsoft.SharePoint;
using Microsoft.SharePoint.Administration;
using Microsoft.SharePoint.Security;

using Mystery.SharePoint;

namespace Magical.RecordCenter
{

	public enum Category
	{
		None = 0,
		Deployment = 100,
		Administration = 200,
        Provisioning = 300,
        Configuration = 400,
		WebPart = 500
	}

	/// <summary>
	/// Provides logging functionality for Foundation 
	/// </summary>
	public class Logger : DiagnosticsService<Category>
	{
		/// <summary>
		///  provides the name for this area
		/// </summary>
		public override string DiagnosticsAreaName { get { return "Magical Record Center"; } }
		/// <summary>
		/// Default constructor
		/// </summary>
		public Logger()
		{
		}
		/// <summary>
		/// Service specific constructor
		/// </summary>
		/// <param name="name"></param>
		/// <param name="farm"></param>
		public Logger(string name, SPFarm farm)
			: base(name, farm)
		{
		}
		/// <summary>
		/// Get a reference to the logger
		/// </summary>
		[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", 
			"CA1704:IdentifiersShouldBeSpelledCorrectly", 
			MessageId = "L", Justification="We want a short name, and class name is prefixed already")]
		public static Logger L
		{
			get
			{
				return SPDiagnosticsServiceBase.GetLocal<Logger>();
			}
		}
	}
}
